package com.c6906.vdam.dps.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Objects;

@ConfigurationProperties(prefix = "dps")
public class DpsOpenStatus {

    private boolean openStatus;

    private boolean openLastGpsToRedis;

    private long heartbeatThresholds;

    public boolean getOpenStatus() {
        return openStatus;
    }

    public void setOpenStatus(boolean openStatus) {
        this.openStatus = openStatus;
    }

    public boolean getOpenLastGpsToRedis() {
        return openLastGpsToRedis;
    }

    public void setOpenLastGpsToRedis(boolean openLastGpsToRedis) {
        this.openLastGpsToRedis = openLastGpsToRedis;
    }

    public long getHeartbeatThresholds() {
        return heartbeatThresholds;
    }

    public void setHeartbeatThresholds(long heartbeatThresholds) {
        this.heartbeatThresholds = heartbeatThresholds;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DpsOpenStatus that = (DpsOpenStatus) o;
        return openStatus == that.openStatus && openLastGpsToRedis == that.openLastGpsToRedis && heartbeatThresholds == that.heartbeatThresholds;
    }

    @Override
    public int hashCode() {
        return Objects.hash(openStatus, openLastGpsToRedis, heartbeatThresholds);
    }

    @Override
    public String toString() {
        return "DpsOpenStatus{" +
                "openStatus=" + openStatus +
                ", openLastGpsToRedis=" + openLastGpsToRedis +
                ", heartbeatThresholds=" + heartbeatThresholds +
                '}';
    }
}